import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:tree_hole/letters/MyDiary.dart';
import 'package:tree_hole/letters/MyImage.dart';

import 'MyMusic.dart';

class MyLetterPage extends StatelessWidget{

  //我的空间（音乐图片日记）

  String token;
  MyLetterPage(this.token);

  Widget build(BuildContext context) {

    return Scaffold(
      appBar: new AppBar(
        title: new Text('我的天空',style:TextStyle(color: Colors.black)),
        backgroundColor: Colors.white70,
        leading: IconButton(
          icon:Icon(Icons.arrow_back,color: Colors.black),
          onPressed: () {Navigator.pop(context);},
        ),
      ),
      body: Container(
          decoration: BoxDecoration(
              image: DecorationImage(
                  fit: BoxFit.cover,
                  image: AssetImage('images/paperpage1.jpg')//获取信纸
              )
          ),

          child: Center(

            child: Column(
              children: [
                Expanded(
                    flex: 6,
                    child: SizedBox()),
                Expanded(
                    flex: 3,
                    child: IconButton(
                      icon: Icon(Icons.email_rounded,color: Colors.amber[300]),
                      iconSize: 50,
                      onPressed: (){
                        Navigator.of(context).push(MaterialPageRoute(builder: (context){
                          return MyDiary(token);},));
                      },
                    )),
                Expanded(
                    flex: 1,
                    child: SizedBox()),
                Expanded(
                    flex: 3,
                    child: IconButton(
                      icon: Icon(Icons.filter_rounded,color: Colors.amber[300]),
                      iconSize: 50,
                      onPressed: (){
                        Navigator.of(context).push(MaterialPageRoute(builder: (context){
                          return MyImage(token);},));
                      },
                    )),
                Expanded(
                    flex: 6,
                    child: SizedBox()),
              ],
            ),
          )
      ),
    );
  }
}